13. gmapping ROS Package

gmapping ROS Package

Now that you’ve learned the Grid-based FastSLAM algorithm, let’s test its power by solving the SLAM problem in simulation. In this lab, you’ll implement a gmapping ROS package which is based on the Grid-based FastSLAM algorithm to map an environment.

gmapping provides laser based SLAM. Meaning that you can feed its node with the robot laser measurements and odometry values and expect it to provide you with a 2D occupancy grid map of the environment. The map will be updated as the robot moves and collect sensory information using its laser range finder sensor.

gmapping package documentation

Access this link and go over the documentation of the gmapping ROS package

Deploying a Turltebot in a Willow Garage environment

You will be deploying a turtlebot in a willow garage environment inside the Udacity Workspace . Thus, navigate to the next concept, enable GPU, and GO TO DESKTOP.

Create a catkin_ws in /home/workspace/

$ mkdir -p /home/workspace/catkin_ws/src
$ cd /home/workspace/catkin_ws/src
$ catkin_init_workspace
$ cd ..
$ catkin_make

Perform a System Update/Upgrade

$ apt-get update
$ apt-get upgrade -y

Clone turtlebot_gazebo and turtlebot_teleop in src

$ cd src/
$ git clone https://github.com/turtlebot/turtlebot_simulator
$ git clone https://github.com/turtlebot/turtlebot

Install packages dependencies

The dependencies are already installed in the workspace but it's always good to check!

$ cd ..
$ source devel/setup.bash
$ rosdep -i install turtlebot_gazebo
$ rosdep -i install turtlebot_teleop

Build the packages

$ catkin_make
$ source devel/setup.bash

Deploying a Turltebot in a Willow Garage environment

$ roslaunch turtlebot_gazebo turtlebot_world.launch world_file:=worlds/willowgarage.world

Now, interface the gmapping package with your robot to perform SLAM!

SLAM with gmapping

Task Description:

Follow these tasks to map an environment with a Grid-based FastSLAM ROS package:

Task List:

Task Feedback:

Great Work!